package com.liefox.controller;

import com.liefox.pojo.Chat;
import com.liefox.pojo.Patient;
import com.liefox.service.ChatServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @Author zjh
 * @Date 2022-10-23 下午 10:52
 **/

@Controller
public class ChatController {

    @Autowired
    private ChatServiceImpl chatService;

    @RequestMapping("/getChatList")
    public String getChatList(Model model) {
        List<Chat> chatList = chatService.getChatList();
        model.addAttribute("chatList",chatList);
        return "doctor/main/chat";
    }
}
